<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>FusionCharts Free Documentation</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    

	<link rel="stylesheet" href="/project2/admin/achievementAnalyse/Contents/Style.css" type="text/css" />
	<LINK media=all href="css/UI.css" type=text/css rel=stylesheet>
	<script language="JavaScript" src="/project2/admin/achievementAnalyse/JSClass/FusionCharts.js"></script>
	
	<script type="text/javascript">
		function updateChart(chartURL){
			var xmlData=document.myForm.xmlValue.value;
			var chart = new FusionCharts(chartURL, "ChartId", "700", "500");
			   chart.setDataXML(xmlData);		   
			   chart.render("chartdiv");
		}
		function displayTag(ex){
			if(ex==0){
				document.all.grap0.style.display="none";
				document.all.grap1.style.display="";
				document.all.grap2.style.display="";
				document.all.yAxisName.style.display="";
				//document.all.comm.style.display="";
			}
			if(ex==1){
				document.all.grap0.style.display="";
				document.all.grap1.style.display="none";
				document.all.grap2.style.display="";
				document.all.yAxisName.style.display="";
				//document.all.comm.style.display="";
			}
			if(ex==2){
				document.all.grap0.style.display="";
				document.all.grap1.style.display="";
				document.all.grap2.style.display="none";
				document.all.yAxisName.style.display="none";
				var x=document.getElementById("comm");
				//document.getElementById("comm").style.display="none";
			}
		}
		
	</script>
	
  </head>
   
  <body>
<form action="allAnalyse" name="myForm" method="post">
    <input type="hidden" name="condition" />
    <input type="hidden" name="xmlValue" value='${xmlValue}'/>
    
	<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
		<TR>

          <td class=top_menu style="text-align: left;font-size: 12px" colspan="2">当前：<span style="color:green">成果及统计分析→统计分析→分析→查看</span></td>
		</TR>
		<tr><td colspan="2"><font color="red">搜索条件为：${achievementType} & ${condition}</font></td></tr>
		<tr>
		  <td colspan="2">
		  	  <input type="button" id="grap0" onclick="updateChart('admin/achievementAnalyse/Charts/FCF_Line.swf');displayTag(0)" value="折线图"/>&nbsp;&nbsp;
		  	  <input type="button" id="grap1" onclick="updateChart('admin/achievementAnalyse/Charts/FCF_Column3D.swf');displayTag(1)" value="柱状图"/>
		  	  <input type="button" id="grap2" onclick="updateChart('admin/achievementAnalyse/Charts/FCF_Pie3D.swf');displayTag(2)" value="饼状图"/>
		  </td>
	  </tr>
	  
	  <tr> 
	  <td align="right"><span id="yAxisName" style="writing-mode:tb-rl;text-align:left"><font size="1px"><b>${achievementType}数量值</b></font></span></td>
	    <td valign="middle" class="text" align=""> <span id="chartdiv" align="center">&nbsp;  
	        FusionCharts. </span>
	      <script type="text/javascript">
	      		displayTag(2);
			   	var chart = new FusionCharts("admin/achievementAnalyse/Charts/FCF_Pie3D.swf", "ChartId", "700", "500");
			   	chart.setDataURL("admin/achievementAnalyse/Gallery/Data/Pie3D.xml");		   
			   	chart.render("chartdiv");
		  </script> 
		</td>
	  </tr>
	  <tr>
	  	<td colspan="2"><span id="comm" style="display:none;text-align: center" ><font color="green">备注：纵坐标为${achievementType}数量，横坐标为${condition}名称</font></span></td>
	  </tr>
	  
	</table>
</form>
  </body>
</html>
